package com.test.spring.collections;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @author lzy
 * @version v1.0
 * Create DateTime: 2018/9/25 18:21
 */
public class Main {
    public static void main(String[] args) {
        ApplicationContext ctx = new ClassPathXmlApplicationContext("application.xml");
        Person person = ctx.getBean("person3", Person.class);
        System.out.println(person);

        NewPerson person1 = ctx.getBean("person4", NewPerson.class);
        System.out.println(person1);

        DataSource dataSource = ctx.getBean("dataSource", DataSource.class);
        System.out.println(dataSource.getProperties());

        Person person2 = ctx.getBean("person6", Person.class);
        System.out.println(person2);
    }
}
